﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BsForApi.Model
{
    /// <summary>
    /// 统一返回
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ApiOut<T>
    {
        public ApiOut()
        {
            State = true;
            Desc = "处理成功";
        }
        public bool State { get; set; }
        public string Desc { get; set; }
        public T Info { get; set; }

        public void SetError(string desc)
        {
            State = false;
            Desc = desc;
        }

        public void SetOK(string desc)
        {
            State = true;
            Desc = desc;
        }
    }
}
